<style>
span.required{color: red;}
div.errorMessage{color: red;margin-top: 3px;}
div.form label {display: inline-block;}
</style>
<?php
/* @var $this SiteController */
/* @var $model ContactForm */
/* @var $form CActiveForm */

$this->pageTitle=Yii::app()->name . ' - 注册';
$this->breadcrumbs=array(
	'注册',
);
?>
<div class="form">
    <h1>用户登录</h1>
    <?php $form = $this -> beginWidget('CActiveForm',
                array(
                		'id'=>'regiseter_form',
                        'enableClientValidation'=>true,
                        'clientOptions'=>array(
                            'validateOnSubmit'=>true,
                        ),
                )
            );
    ?>
        <table cellpadding="5" cellspacing="3" style="text-align:left; width:100%; border:0;">
            <tbody>
                <tr>
                    <td style="width:12%; text-align: left;">
                        <?php echo $form->labelEx($user_model, 'username'); ?>
                    </td>

                    <td style="width:88%;">
                        <div style=" float: left;">
                        <?php echo $form->textField($user_model,'username',array('class'=>'inputBg','id'=>'User_username')); ?>
                        </div>
                        <!--表单验证失败显示错误信息-->
                        <?php echo $form ->error($user_model,'username'); ?>
                         
                    </td>
                </tr>
                <tr>
                    <td style="text-align: left;">
                       <?php echo $form->labelEx($user_model, 'password'); ?>
                    </td>

                    <td>
                        <div style=" float: left;">
                        <?php echo $form->passwordField($user_model,'password',array('class'=>'inputBg','id'=>'User_password','value'=>'')); ?>
                        </div>
                        <?php echo $form ->error($user_model,'password'); ?>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: left;">
                        <?php echo $form->labelEx($user_model,'password2') ?>
                    </td>
                    <td>
                        <div style=" float: left;">
                        <?php echo $form->passwordField($user_model,'password2',array('class'=>'inputBg','id'=>'User_password2','value'=>'')); ?>
                        </div>
                        <?php echo $form ->error($user_model,'password2'); ?>
                    </td>

                </tr>
                <tr>
                    <td style="text-align: left;"><?php echo $form->labelEx($user_model, 'user_email'); ?></td>
                    <td>
                        <div style=" float: left;">
                        <?php echo $form->textField($user_model,'user_email',array('class'=>'inputBg','id'=>'User_user_email')); ?>
                        </div>
                        <?php echo $form->error($user_model,'user_email'); ?>
                    </td>
                </tr>
                <tr>

                    <td style="text-align: left;"><?php echo $form->labelEx($user_model, 'user_qq'); ?></td>
                    <td>
                        <div style=" float: left;">
                        <?php echo $form->textField($user_model,'user_qq',array('class'=>'inputBg','id'=>'User_user_qq')); ?>
                        </div>
                        <?php echo $form->error($user_model,'user_qq'); ?>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: left;"><?php echo $form->labelEx($user_model, 'user_tel'); ?></td>
                    <td>
                        <div style=" float: left;">
                        <?php echo $form->textField($user_model,'user_tel',array('class'=>'inputBg','id'=>'User_user_tel','maxlength'=>11)); ?>
                        </div>
                        <?php echo $form->error($user_model,'user_tel'); ?>
                    </td>
                </tr>
                <tr>
                    <!--radioButtonList($model,$attribute,$data,$htmlOptions=array())-->
                    <td style="text-align: left;"><?php echo $form->label($user_model, 'user_sex'); ?></td>
                    <td>
                        <?php echo $form->radioButtonList($user_model,'user_sex',$sex,array('separator'=>'&nbsp;')); ?>
                    </td>
                </tr>
                
                <tr>

                    <!--textArea($model,$attribute,$htmlOptions=array())-->
                    <td style="text-align: left;"><?php echo $form->label($user_model, 'user_introduce'); ?></td>
                    <td>
                        <?php //echo $form -> textArea($user_model,'user_introduce',array('cols'=>50,'rows'=>5)); ?>
                    	<?php $this->widget('ext.KEditor.KEditor',array(  
						            'model'=>$user_model,  //传入form model  
						            'name'=>'user_introduce', //设置name  
						            'properties'=>array(  
						                //设置接收文件上传的action  
						                'uploadJson'=>'index.php?r=user/upload',  
						                //设置浏览服务器文件的action，这两个就是上面配置在/admin/default的  
						                'fileManagerJson'=>'index.php?r=user/manageJson',  
						                                'items'=>array('source', '|', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',  
								                        'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',  
								                        'insertunorderedlist', '|',  'image', 'insertfile', 'link','unlink'),    
						                'newlineTag'=>'br',  
						                'allowFileManager'=>true,  
						                //传值前加js:来标记这些是js代码  
						                'afterCreate'=>"js:function() {  
						                        K('#ChapterForm_all_len').val(this.count());  
						                        K('#ChapterForm_word_len').val(this.count('text'));  
						                    }",  
						                'afterChange'=>"js:function() {  
						                        K('#ChapterForm_all_len').val(this.count());  
						                        K('#ChapterForm_word_len').val(this.count('text'));  
						                    }",  
						            ),   
						            'textareaOptions'=>array(  
						                'style'=>'width:500px;height:200px;',  
						            )  
						        )); ?>  
                    </td>
                </tr>
                <tr>
                    <td><a href="./index.php?r=user/login">已经注册？</a></td>

                    <td align="left">
                        <input name="Submit" value="会员注册" class="us_Submit_reg" type="submit" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2"></td>
                </tr>
            </tbody>
        </table>

    <?php $this->endWidget(); ?>
</div>

            
            
        